import { type App } from "vue"
import { loadElementPlus } from "./element-plus"
import { loadElementPlusIcon } from "./element-plus-icon"
import { loadVxeTable } from "./vxe-table"
import { useDict } from "@/utils/dict"
import { parseTime, addDateRange, handleTree, selectDictLabel, selectDictLabels } from "@/utils/ruoyi"
// 预设动画
import animate from "@/animate"
export function loadPlugins(app: App) {
  // 全局方法挂载
  app.config.globalProperties.useDict = useDict
  app.config.globalProperties.animate = animate
  app.config.globalProperties.handleTree = handleTree

  loadElementPlus(app)
  loadElementPlusIcon(app)
  loadVxeTable(app)
}

// export default function installPlugin(app: App) {
//   // 全局方法挂载
//   app.config.globalProperties.useDict = useDict;

// }
